<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Veja o exemplo a seguir</title>
    </h:head>
    <h:body>
        <h1>Veja</h1>
        <h:form>
            <h2>
                Trocar aula de JSF por um dos itens abaixo:
            </h2>
            <div>
                Cliente: <h:inputText value="#{bean.cliente}"></h:inputText>
            </div>
            <div>
                Tipo: <h:selectOneRadio value="#{bean.tipoSelecionado}">
                    <f:selectItems value="#{bean.tipo}"></f:selectItems>
                </h:selectOneRadio>
            </div>
            <div>
                Como voce conheceu?<br />
                <h:selectManyCheckbox value="#{bean.conheceuSelecionado}">
                    <f:selectItems value="#{bean.conheceu}"></f:selectItems>
                </h:selectManyCheckbox>
            </div>
            <div>
                Sabor?<br />
                <h:selectManyListbox value="#{bean.saborSelecinado}">
                    <f:selectItems value="#{bean.sabor}"></f:selectItems>
                </h:selectManyListbox>
            </div>
            <hr/>
            <h:dataTable var="teste" value="#{bean.saborSelecinado}">
                <h:column>#{teste}</h:column>
            </h:dataTable>
            <hr/>
            <h:dataTable var="pastel" value="#{bean.pastel}">
                <h:column>
                    <f:facet name="header">
                        Nome
                    </f:facet>
                    #{pastel.nome}
                </h:column>
                <h:column>
                    <f:facet name="header">
                        Valor
                    </f:facet>
                    #{pastel.valor}
                </h:column>
            </h:dataTable>
            <h:commandButton value="Ok" action="#{bean.verificarFormulario}" />
            <h:commandButton value="Limpar" action="#{bean.limparFormulario}" />
        </h:form>
    </h:body>
</html>

